package main

import "fmt"

func main() {
	a, b := 10, 20

	swap(a, b)

	fmt.Printf("main: a = %d, b = %d\n", a, b)
}

func swap(a, b int) {
	a, b = b, a // 值传递
	fmt.Printf("swap: a = %d, b = %d\n", a, b)
}
